#include <Ice/Ice.h>
#include <IceUtil/IceUtil.h>

#include "AlgorithmIce.h"

int main()
{
    //Ice::CommunicatorHolder communicator;
    Ice::CommunicatorPtr communicator;
    try{
        communicator = Ice::initialize();
        Ice::ObjectPrxPtr base = communicator->stringToProxy("server:tcp -h localhost -p 10091");
        AlgorithmIce::ServerPrxPtr alg = ICE_CHECKED_CAST(AlgorithmIce::ServerPrx,base);
        alg->Ask(1,"HelloWorld!");
    }catch (const Ice::Exception& e){
        std::cerr << e.what() << std::endl;
    }
    if(communicator) communicator->destroy();
    return 0;
}